Skip to content

Conversation

@minjcho
Copy link

@minjcho minjcho commented Jan 16, 2026

Issue: #9670

Description of changes:

  • Add a new output format, --format fish, to aws configure export-credentials.
  • Fish shell does not support export VAR=value; it uses set -gx VAR value.
This change lets Fish users apply exported credentials directly without extra conversion.

Usage:

aws configure export-credentials --format fish | source

Example output:

set -gx AWS_ACCESS_KEY_ID AKIAIOSFODNN7EXAMPLE
set -gx AWS_SECRET_ACCESS_KEY wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
set -gx AWS_SESSION_TOKEN token
set -gx AWS_CREDENTIAL_EXPIRATION 2023-01-01T00:00:00Z

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copilot AI review requested due to automatic review settings January 16, 2026 07:27
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds Fish shell support to the aws configure export-credentials command, allowing Fish shell users to export AWS credentials in a format compatible with their shell.

Changes:

  • Added a new FishShellFormatter class that outputs credentials using Fish shell's set -gx syntax
  • Updated the SUPPORTED_FORMATS dictionary to include the new Fish formatter
  • Added comprehensive unit tests for the Fish shell formatter covering both static and temporary credentials

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
awscli/customizations/configure/exportcreds.py Implements FishShellFormatter class and registers it in SUPPORTED_FORMATS
tests/unit/customizations/configure/test_exportcreds.py Adds test cases for FishShellFormatter with expected output formats

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@minjcho minjcho force-pushed the feature/fish-shell-export-credentials branch from 622af44 to 1c54577 Compare January 21, 2026 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant